Parsing errors

We can identify most error cases. We can document the error cases and the expected error messages here. Users can search this page to find more information about an error and solve their issue.

Parsing errors happen when the given input is not syntactically correct. That is, it doesn't follow the grammar rules.

Creating an entity

The grammar rule for an entity is

Entity:
    name+=ID+
    ( ':' base+=ID+ )?
    ( '{' components+=Component (',' components+=Component)* '}')
    |
    ('[' subEntities+=Entity (',' subEntities+=Entity)* ']')

The following code contains all the complexity an entity can handle

"entity % name ☀ with unicode"
    : "base"
    {
        vector -2.04e+45 90 008,
        asset "☆ more unicode"
    }
Validation correct

And this gives errors

%name%

Error while parsing entity

Wrong start of concept

When starting a file with

%name%

Generates an error with output

Error while parsing the concept.
To start a block you can either:
- Specify an entity with a string '"'
- Specify a procedure with an identifier

Wrong name of entity

"entity/folder"

produces the error

e

Colon or open

"entity" anything
Error while parsing the entity.
After the name you can either:
- Specify the base of the entity with ':'
- Specify the list of components with '{'
anything does not match ':' nor '{'

Base filename

"entity" : "base/name"
Error while parsing the entity.
The base of an entity must be a filename.
Filenames cannot contain a forward slash: /

Wrong name

This happens when the name of an entity is not valid. The error message is

> Wrong name of entity.
> The name of an entity must be a list of identifiers.

The parser gives further information depending on the case:

It cannot contain special characters

%entity%
Cannot contain special characters: %.

It cannot start with digits

7entity
Cannot start with a digit: 7.

It can be a reserved word

foreach
Cannot be a reserved word: foreach.

It can contain any number of identifiers as long as they follow these rules

entity name%
Cannot contain special characters: %

Incomplete entity

This error happens when the parser is waiting for additional input.

Not found here

If the error you are getting is not listed, please create issue in the Github issues page.